package com.Tjise.JAVAzuoye2;

public class SalasEmployee extends ColaEmployee {
    double Msell;
    double royaltyRate;

    public SalasEmployee(String name, int birthday, double msell, double royaltyRate) {
        super(name, birthday);
        Msell = msell;
        this.royaltyRate = royaltyRate;
    }

    @Override
    public double getSalary(int birthday) {
        if(super.getBirthday() == birthday) {
            return Msell * royaltyRate + 100;
        }else {
            return Msell * royaltyRate;
        }
    }
}
